package org.code.mallspringboot.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.code.mallspringboot.pojo.PmsSkuStock;

import java.util.List;

@Mapper
public interface PmsSkuMapper {

    /**
     查询SKU库存
     * @param id
     * @param keyword
     * @return
     */
    List<PmsSkuStock> selectByIdAndKeyword(@Param("id") int id, @Param("keyword") String keyword);

    /**
     SKU修改
     * @param productId
     * @param skuCode
     * @param price
     * @param stock
     * @param lowStock
     * @return
     */
    int update(@Param("productId") int productId,@Param("skuCode") String skuCode,
               @Param("price") double price,@Param("stock") Integer stock,@Param("lowStock") Integer lowStock);
}
